<?php
/* File: double_form.inc
* Desc: Contains the code for a Web page that displays
* two HTML forms, side by side in a table.
*/
//include("functions.inc");
?>

<h1 align="center">
<?php
echo $page['top'];
if (isset($GLOBALS['message_1']))
{
	echo "<p
	style=\"font-weight: bold;
	font-style: italic;
	font-size: 90%; color: red\">
	{$GLOBALS['message_1']}</p>";
}
?></h1>
<table border="0" cellpadding="5" cellspacing="0">
<?php
############
# Form 1 #
############
?>
<tr>
<td width="25%" valign="top">
<p style="font-size: 110%; font-weight: bold">
<?php echo $elements_1['top']?></p>
<form action="Login.php" method="POST">
<?php
if(isset($_GET['page'])){
	print '<input value='.$_GET['page'].' type="hidden" name="page">';
}
?>
<table cellpadding="10px" border="0">
<?php
foreach($fields_1 as $field => $value)
{
	if(ereg("pass",$field)) #38
	$type = "password";
	else
	$type = "text";
	echo "<tr><td style=\"text-align: right;
	font-weight: bold\">$value</td>
	<td><input type='$type' name='$field'
	value='".@$$field."'
	size='{$length_1[$field]}'
	maxsize='{$length_1[$field]}'>
	</td></tr>\n";
}
?>
<tr>
<!--<td colspan="2" style="text-align: center">
<img src="../captcha/CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br />
	<label for="security_code">Security Code: </label><input id="security_code" name="security_code" type="text" />
</td>-->
</tr>
<tr>
<td colspan="2" style="text-align: center">
	<br>
    <img src="../captcha/CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br />
	<label for="security_code">Security Code: </label><input id="security_code" name="security_code" type="text" /><br />
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center" >
<br />
<input type="submit" name="Button"
value="<?php echo $elements_1['submit']?>">
</td></tr>
</table>
</form>

<!-- Column that separates the two forms -->
<!-- <td style="background-color: gray"></td> -->

<?php
############
# Form 2 #
############
?>

<td width="75%">
<p style="font-size: 110%; font-weight: bold">
<?php echo $elements_2['top']?>
<form action="Login.php" method="POST" enctype="multipart/form-data">
<p>
<table border="0" cellpadding="10px" width="100%">
<?php
if (isset($GLOBALS['message_2']))
{
	echo "<tr>
<td colspan='2'
style=\"font-weight: bold; font-style: italic;
font-size: 90%; color: red\">
{$GLOBALS['message_2']}<p></td></tr>";
}
foreach($fields_2 as $field => $value)
{
	//	if($field == "state")
	//	{
	//		echo "<tr><td style=\"text-align: right;
	//font-weight: bold\">State</td>
	//<td><select name='state'>";
	//		$stateName=getStateName();
	//		$stateCode=getStateCode();
	//		for ($n=1;$n<=3;$n++)
	//		{
	//			$state=$stateName[$n];
	//			$scode=$stateCode[$n];
	//			echo "<option value='$scode'";
	//			if ($scode== @$_POST['state'])
	//			echo " selected";
	//			echo ">$state\n";
	//		}
	//		echo "</select>";
	//	}
	//	else
	//	{
	if(ereg("pass", $field)){
		$type = "password";
	}
	else if(ereg("file", $field)){
		$type = "file";
	}
	else{
		$type = "text";
	}

	echo "<tr><td style=\"text-align: right;
		font-weight: bold\">$value</td>
		<td><input type='$type' name='$field'
		value=\"".@$$field."\"
		size='{$length_2[$field]}'
		maxsize='{$length_2[$field]}'>
		</td></tr>";
}
echo '<tr><td colspan="2">(images must be less than 2MB and in jpg format)</td></tr>';
//}
?>
<tr>
<td colspan="2" style="text-align: center">
	<br>
    <img src="../captcha/CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br />
	<label for="security_code">Security Code: </label><input id="security_code" name="security_code2" type="text" /><br />
</td>
</tr>
<tr><td colspan="2" style="text-align: center">
<p style="margin-top: .05in">
<input type="submit" name="Button"
value="<?php echo $elements_2['submit']?>">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>


